package com.neuedu.utils;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;

public class CloseUtils {
	public static void close(Connection connection,PreparedStatement prst,ResultSet rs) {
		if(connection!= null)
		{
			try {
				connection.close();
			} catch (SQLException e) {
				e.printStackTrace();
			}
		}
		if(prst!= null)
		{
			try {
				prst.close();
			} catch (SQLException e) {
				e.printStackTrace();
			}
		}
		if(rs!= null)
		{
			try {
				rs.close();
			} catch (SQLException e) {
				e.printStackTrace();
			}
		}
	}
}
